package com.coocaa.ops.admin.v1.timedtask.model;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author bijiahao
 * @date : 2018/5/22.
 * @description
 */
@Data
public class TimedInfoModel implements Serializable {
    /**
     * 资源ID
     */
    private Integer resourceId;
    /**
     * 当前版本
     */
    private Integer currentVersion;
    /**
     * 是否定时 0否 1是
     */
    private Integer isTiming;

    /**
     * 上线时间
     */
    private Date releaseTime;

    /**
     * 用户ID
     */
    private Integer userId;

    public TimedInfoModel() {
    }

    public TimedInfoModel(Integer resourceId, Integer currentVersion, Integer isTiming, Date releaseTime, Integer userId) {
        this.resourceId = resourceId;
        this.currentVersion = currentVersion;
        this.isTiming = isTiming;
        this.releaseTime = releaseTime;
        this.userId = userId;
    }

    public static TimedInfoModel getTimedInfoModel(Integer resourceId, Integer currentVersion, Integer isTiming, Date releaseTime, Integer userId) {
        return new TimedInfoModel(resourceId, currentVersion, isTiming, releaseTime, userId);
    }


}
